/**
 *	\file
 *	\brief contains all the function for semantic analysis purpose
 *
 * 	\date Aug 27, 2013
 * 	\author koldar
 */

#ifndef SEMANTIC_H_
#define SEMANTIC_H_

#include "SyntaxNode.h"
//#include "ClassHashTable.h"
//#include "LabelHashTable.h"
#include <stdbool.h>


void sem(PSyntaxNode pnode);

/**Creates the hash tables necessary to generate the intermediate code. Basically the function generates:
 * \li the Class table;
 * \li the Label table;
 *
 * \pre
 *  \li labeltable must <b>NOT</b> be already used (otherwise memory leak may arise);
 *  \li classtable must <b>NOT</b> be already used (otherwise memory leak may arise);
 *  \li pnode must not be NULL;
 * \post
 *  \li in label table there are stored all the label defined by the <b>very</b> source file;
 *  \li in class table there are store all the classes (and its resources) defined by the <b>very</b> source file;
 *
 * @param pnode the root node of the Abstract Syntax Tree
 * @param labeltable a pointer where a label table can be allocated
 * @param classtable a pointer where a class table can be allocated
 * @return TRUE if there is no semantic error in the file, FALSE if there is at least one
 */
//void sym(PSyntaxNode pnode,PlabelHashTable labeltable,PclassHashTable classtable);



#endif /* SEMANTIC_H_ */
